package com.jin.notifyserver;

import androidx.lifecycle.LiveData;
import androidx.lifecycle.MutableLiveData;

public class CommandRepository {
    // 单例实例
    private static CommandRepository INSTANCE;

    // 修改设备号
    private  final MutableLiveData<OkxDto> okxLiveData = new MutableLiveData<>();


    // 私有构造函数
    private CommandRepository() {}

    // 获取单例
    public static synchronized CommandRepository getInstance() {
        if (INSTANCE == null) {
            INSTANCE = new CommandRepository();
        }
        return INSTANCE;
    }

    public LiveData<OkxDto> getOkxLiveData() {
        return okxLiveData;
    }


    public void okx(OkxDto okxDto) {
        okxLiveData.postValue(okxDto);
    }
}
